-- Wrex

include( 'shared.lua' )
include( 'help/USRPhelp.lua')
include( 'menus/employment.lua')
include( 'hud/hud.lua')

local RaceMenu
local SelectRace
local LumanianRace1
local LumClassSelect
local RandroidRace1
local LumWorker
local LumMiner
local LumBuilder
local RanClassSelect
local RanWorker
local RanMiner 
local RanBuilder
local RanBuilder


function RaceSelectMenu()



RaceMenu = vgui.Create('DFrame')
RaceMenu:SetSize(320, 160)
RaceMenu:SetPos(ScrW()/2,ScrH()/2)
RaceMenu:SetTitle('Race Selection')
RaceMenu:SetSizable(false)
RaceMenu:SetVisible( true )
RaceMenu:SetDraggable( false )
RaceMenu:SetDeleteOnClose(false)
RaceMenu:ShowCloseButton(false)
RaceMenu:MakePopup()

SelectRace = vgui.Create('DLabel')
SelectRace:SetParent( RaceMenu )
SelectRace:SetPos(100, 30)
SelectRace:SetText('Please Select Your Race')
SelectRace:SizeToContents()
SelectRace:SetTextColor(Color(255, 0, 0, 255))

RandroidClass = vgui.Create('DButton')
RandroidClass:SetParent( RaceMenu )
RandroidClass:SetSize(140, 90)
RandroidClass:SetPos(10, 50)
RandroidClass:SetText('Randroid')
RandroidClass.DoClick = function() 

RandroidRace()
RaceMenu:SetVisible( false )
end

LumanianClass = vgui.Create('DButton')
LumanianClass:SetParent( RaceMenu )
LumanianClass:SetSize(140, 90)
LumanianClass:SetPos(170, 50)
LumanianClass:SetText('Lumanian')
LumanianClass.DoClick = function() 

LumanianRace()
RaceMenu:SetVisible( false )
end



end

function LumanianRace()

LumClassSelect = vgui.Create('DFrame')
LumClassSelect:SetSize(285, 219)
LumClassSelect:SetPos(ScrW()/2, ScrH()/2)
LumClassSelect:SetTitle('Lumanian Class Selection')
LumClassSelect:SetDeleteOnClose(false)
LumClassSelect:SetSizable(false)
LumClassSelect:SetVisible( true )
LumClassSelect:SetDraggable( false )
LumClassSelect:ShowCloseButton(false)
LumClassSelect:SetBackgroundBlur(true)
LumClassSelect:MakePopup()


	
LumWorker = vgui.Create('DButton')
LumWorker:SetParent( LumClassSelect )
LumWorker:SetSize(80, 180)
LumWorker:SetPos(195, 30)
LumWorker:SetText('Worker')
LumWorker.DoClick = function() 
RunConsoleCommand("lumanian_worker") 
LumClassSelect:SetVisible( false )

end

LumBuilder = vgui.Create('DButton')
LumBuilder:SetParent( LumClassSelect )
LumBuilder:SetSize(80, 180)
LumBuilder:SetPos(105, 30)
LumBuilder:SetText('Builder')
LumBuilder.DoClick = function() 
RunConsoleCommand("lumanian_builder") 
LumClassSelect:SetVisible( false )

end

LumMiner = vgui.Create('DButton')
LumMiner:SetParent( LumClassSelect )
LumMiner:SetSize(80, 180)
LumMiner:SetPos(5, 30)
LumMiner:SetText('Miner')
LumMiner.DoClick = function() 
RunConsoleCommand("lumanian_miner") 
LumClassSelect:SetVisible( false )

end

end

function RandroidRace()

RanClassSelect = vgui.Create('DFrame')
RanClassSelect:SetSize(285, 219)
RanClassSelect:SetPos(ScrW()/2, ScrH()/2)
RanClassSelect:SetTitle('Randroid Class Selection')
RanClassSelect:SetDeleteOnClose(false)
RanClassSelect:SetSizable(false)
RanClassSelect:SetVisible( true )
RanClassSelect:SetDraggable( false )
RanClassSelect:ShowCloseButton(false)
RanClassSelect:SetBackgroundBlur(true)
RanClassSelect:MakePopup()


	
RanWorker = vgui.Create('DButton')
RanWorker:SetParent( RanClassSelect )
RanWorker:SetSize(80, 180)
RanWorker:SetPos(195, 30)
RanWorker:SetText('Worker')
RanWorker.DoClick = function() 
RunConsoleCommand("randroid_worker") 
RanClassSelect:SetVisible( false )

end

RanBuilder = vgui.Create('DButton')
RanBuilder:SetParent( RanClassSelect )
RanBuilder:SetSize(80, 180)
RanBuilder:SetPos(105, 30)
RanBuilder:SetText('Builder')
RanBuilder.DoClick = function() 
RunConsoleCommand("randroid_builder") 
RanClassSelect:SetVisible( false )

end

RanMiner = vgui.Create('DButton')
RanMiner:SetParent( RanClassSelect )
RanMiner:SetSize(80, 180)
RanMiner:SetPos(10, 30)
RanMiner:SetText('Miner')
RanMiner.DoClick = function() 
RunConsoleCommand("randroid_miner") 
RanClassSelect:SetVisible( false )

end

end


concommand.Add("race_selection",RaceSelectMenu)

